import request from '@/utils/_request'

/**竞赛信息列表*/
export function listPost(data) {
    return request({
        url: '/admin/contest/query',
        method: 'POST',
        data: data
    })
}

/**报名*/
export function addRaceTeam(data, id) {
    return request({
        url: '/admin/contest/person/add/' + id,
        method: 'POST',
        data: data
    })
}

/**查询部门*/
export function listDept(data) {
    return request({
        url: '/admin/contest/dept/query',
        method: 'POST',
        data: data
    })
}

//修改人员信息
export function getRaceTeam(id) {
    return request({
        url: '/admin/contest/queryById/' + id,
        method: 'GET'
    })
}

/** 上传竞赛结果 v1 */
export function uploadContestRes(id, data) {
    return request({
        url: `/admin/contest/result/person/apply/${id}`,
        method: 'POST',
        data: data
    })
}

/**删除选手*/
export function delPlayer(id){
    return request({
        url:'/admin/contest/prepare/person/delete/'+id,
        method:'DELETE'
    })
}